import request from './request'

import requestMock from './requestMock'

// 封装一个登录的请求接口的方式
export const login = ( data ) => request.login('/login/checklogin', data)
export const logout = () => request.get('/login/logout')

// 后台账号
export const addMan = ( data ) => request.post('/system/user/add', data)
export const getMan = ( params ) => request.get('/system/user/get', params)
export const removeMan = (data) => request.post('/system/user/delete',data)

// 角色接口
export const getRole = () => request.get('/system/role/get')
export const addRole = (data) => request.post('/system/role/add', data)

// 权限管理接口
export const getScope = () => request.get('/system/scope/getAll')

// 商品属性的接口
export const getGoodsAttr = () => request.get('/goods/attr/get')

// 商品分类的接口
export const getGoodsCategory = () => request.get('/goods/category/get')
export const addGoodsCategory = (data) => request.post('/goods/category/add', data)

// 获取前端路由
export const getSystemRoute = () => request.get('/system/route/get')

